{{extend "head.html"}}

{{block content}}

<div class="row">
 <div class="span4">
 <div class="well">
    <hr>
    <ul id="site" class="ztree"></ul>
 </div>
 </div>

 <div class="span6 well">
      <div class="tabbable "> <!-- Only required for left/right tabs -->
          <ul class="nav nav-tabs">
           <li class="active"><a href="#catetab1" data-toggle="tab">站点信息</a></li>
            <li><a href="#catetab2" data-toggle="tab">新建栏目</a></li>
          </ul>
        <div class="tab-content">
         <div class="tab-pane active" id="catetab1">

   	   {{<<siteform}}
	   <div>
	     如果需要上传本地logo图片，点击这里
 	     <input id="fileuploadlogo" type="file" name="files" >
	   </div>
	 </div> <!--tab pane active-->

	 <div class="tab-pane" id="catetab2">
                {{<<categoryform}}
         </div>
	</div> <!--tab-content-->
      </div> <!--tabbable-->

 </div>
</div> <!--row-->

<SCRIPT LANGUAGE="JavaScript">
    var setting = {
            data:{
                simpleData:{
                    enable:true,
                    idKey:'id',
                    pIdKey:'pId'
                    }
                },
            async:{
                enable:true,
                url:"/getdatatree"
                }
    };

    $(document).ready(function(){
        $.fn.zTree.init($("#site"), setting);
    });

</SCRIPT>



{{end}}

{{block js_script}}
<script>
$(function () {
    $('#fileuploadlogo').fileupload({
        dataType: 'json',
        url: '/admin/upload',
        done: function (e, data) {
                document.getElementById('field_logo').value=data.result.url
        }
    });
});

</script>
{{end}}

